# -*- coding: utf-8 -*-#
#-------------------------------------------------------------------------------
# 建立者:        黄周云  
# Name:         test02
# Description:   例6.2
# Author:       ASUS
# Date:         2019/3/4
#-------------------------------------------------------------------------------

# 字典键可以是任意不可变类型
dict = {}
dict[20] = "bill"
dict["mike"] = {'age':30,'salary':3000}
dict[(12,"mike",True)] = "hello"
print(dict)

IDEs = {
    'eclipse':
        {
         'languages':['java','python','javascript','php'],
         'organization':'eclipse基金会'
        },
    'visualstudio':
        {
         'languages':['c#','c++','vb.net'],
        'organization':'微软'
        },
    'webstorm':
        {
          'languages':['javascript'] ,
          'organization':'jetbrains'
         }
}
labels = {
    'languages':'支持的编程语言',
    'organization':'所属机构'
}
IDE = input("请输入IDE的名字：")
findIDE = IDE.replace(" ","").lower()
choice = input("要查绚IDE支持的编程语言（lang）还是所属机构（org）：")
if choice == 'lang':
    key = 'languages'
if choice == 'org':
    key = 'organization'
if findIDE in IDEs:
    print("{}{}是{}.".format(IDE,labels[key],IDEs[findIDE][key]))
